package com.ruoyi.system.employee.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.employee.mapper.ServiceEmployeeMapper;
import com.ruoyi.system.employee.domain.ServiceEmployee;
import com.ruoyi.system.employee.service.IServiceEmployeeService;
import com.ruoyi.common.core.text.Convert;

/**
 * 员工Service业务层处理
 * 
 * @author Administrator
 * @date 2021-03-06
 */
@Service
public class ServiceEmployeeServiceImpl implements IServiceEmployeeService 
{
    @Autowired
    private ServiceEmployeeMapper serviceEmployeeMapper;

    /**
     * 查询员工
     * 
     * @param id 员工ID
     * @return 员工
     */
    @Override
    public ServiceEmployee selectServiceEmployeeById(Long id)
    {
        return serviceEmployeeMapper.selectServiceEmployeeById(id);
    }

    /**
     * 查询员工列表
     * 
     * @param serviceEmployee 员工
     * @return 员工
     */
    @Override
    public List<ServiceEmployee> selectServiceEmployeeList(ServiceEmployee serviceEmployee)
    {
        return serviceEmployeeMapper.selectServiceEmployeeList(serviceEmployee);
    }

    /**
     * 新增员工
     * 
     * @param serviceEmployee 员工
     * @return 结果
     */
    @Override
    public int insertServiceEmployee(ServiceEmployee serviceEmployee)
    {
        return serviceEmployeeMapper.insertServiceEmployee(serviceEmployee);
    }

    /**
     * 修改员工
     * 
     * @param serviceEmployee 员工
     * @return 结果
     */
    @Override
    public int updateServiceEmployee(ServiceEmployee serviceEmployee)
    {
        return serviceEmployeeMapper.updateServiceEmployee(serviceEmployee);
    }

    /**
     * 删除员工对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteServiceEmployeeByIds(String ids)
    {
        return serviceEmployeeMapper.deleteServiceEmployeeByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除员工信息
     * 
     * @param id 员工ID
     * @return 结果
     */
    @Override
    public int deleteServiceEmployeeById(Long id)
    {
        return serviceEmployeeMapper.deleteServiceEmployeeById(id);
    }
}
